package cn.waka.sys.admin.object;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class Page {
    private int count;

    private int page = 1;

    private int size = 10;

    private List data;

    private int totalPage;

    private int other;

    private Map<String, Object> param;


    public Map<String, Object> getParam() {
        return param;
    }

    public int getOther() {
        return other;
    }

    public void setOther(int other) {
        this.other = other;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public List<?> getData() {
        return data;
    }


    public void addData(Object obj) {
        if (data == null) {
            data = new LinkedList();
        }
        data.add(obj);
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public void setData(List data) {
        this.data = data;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }


    public void addParam(String key, Object value) {
        if (param == null) {
            param = new HashMap<String, Object>();
        }
        param.put(key, value);
    }
}
